#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<list>
#include<algorithm>
using namespace std;

void test01()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	list<int>::iterator it = lt.begin();
	while (it != lt.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	sort(lt.begin(), lt.end());
}
struct A
{
public:
	A(int a1 = 10, int a2 = 10)
		:_a1(a1), _a2(a2)
	{

	}
	int _a1;
	int _a2;
};


void test02()
{
	list<A> lt;
	A aa1(10, 10);
	lt.push_back(10);
	lt.push_back(A(2, 2));

	lt.emplace_back(A(2, 3));
	lt.emplace_back(2,3);
	lt.emplace_back(2,4);

}
int main()
{
	test01();
	return 0;
}